package com.dubbo.consumer.quickstart;

import com.alibaba.dubbo.config.annotation.Reference;
import com.dubbo.service.IHelloService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.ExecutionException;

@RestController
public class QuickstartConsumer {
    @Reference(interfaceClass = IHelloService.class,timeout = 10000,group = "A")
    private IHelloService helloService;

    @GetMapping(value = "test")
    public void test() throws ExecutionException, InterruptedException {
        System.out.println(helloService.sendMessage("休息下"));
    }
}
